import { reqGetGoodInfo } from "@/api"
import {getUUID} from '@/utils/uuid_token'
const state = {
    skuInfo:{},
    categoryView:{},
    spuSaleAttrList:{},
    uuid_token:getUUID()
}
const actions = {
    async getGoodInfo(context,params={}){
        const result = await reqGetGoodInfo(params)
        // console.log('获得detail数据',result);
        context.commit('GETGOODINFO',result.data)
    }
}
const mutations = {
    GETGOODINFO(state,data){
        state.skuInfo = data.skuInfo
        state.categoryView = data.categoryView
        state.spuSaleAttrList = data.spuSaleAttrList
    }
}
const getters = {

}
export default({
    state,
    actions,
    mutations,
    getters
})